<?php


function runtime($mode = 0) { 
	static $t; 
    if(!$mode) { 
		$t = microtime(); 
		return; 
    } 
    $t1 = microtime(); 
    list($m0,$s0) = split(" ",$t);
    list($m1,$s1) = split(" ",$t1);
    return sprintf("%.3f ms",($s1+$m1-$s0-$m0)*1000); 
} 